﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Jinjia.Approve.IRepository.JJFlow;
using Jinjia.Approve.IService.JJFlow.Approvers;
using JinJia.Core.Base.Exceptions;

namespace Jinjia.Approve.Service.JJFlow.Approvers
{
    public class PromotionApplyApproverRealize : IJJApprovers
    {
        private readonly IJJApproversRepository _jjApproversRepository;

        public PromotionApplyApproverRealize(IJJApproversRepository jjApproversRepository)
        {
            _jjApproversRepository = jjApproversRepository;
        }

        public async Task<List<int>> GetInstanceNodeEmpInfo(string biz_order_id, int start_user = 0, string depart_id = "0", Dictionary<string, string> dic = null)
        {
            if (!int.TryParse(biz_order_id, out int master_id)) throw new BusinessException("参数有误！");
            var promotionApplyApproverRealizeGetApproverIds = await _jjApproversRepository.PromotionApplyApproverRealizeGetApproverIds(master_id);
            return promotionApplyApproverRealizeGetApproverIds;
        }
    }
}